package com.freesky.web.portal.reomte;

import com.freesky.common.utils.reponse.JSONResponse;
import com.freesky.common.vo.VOCart;
import com.freesky.common.vo.CartItem;
import com.freesky.common.pojo.Result;
import com.freesky.web.portal.reomte.fallback.CartRemoteFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient(name = "emall-provider-zuul", fallback = CartRemoteFallback.class)
public interface CartRemote {
    String ZUUL_URL_PREFIX ="/mysevice/order";
    @PostMapping(value =ZUUL_URL_PREFIX+ "/member/addCart")
    JSONResponse addCart(@RequestBody VOCart cart);

    @PostMapping(value =ZUUL_URL_PREFIX+ "/member/cartList")
    JSONResponse getCartList(@RequestBody VOCart cart);

    @PostMapping(value =ZUUL_URL_PREFIX+ "/member/cartEdit")
    JSONResponse updateCartNum(@RequestBody VOCart cart);

    @PostMapping(value = ZUUL_URL_PREFIX+"/member/editCheckAll")
    JSONResponse editCheckAll(@RequestBody VOCart cart);

    @PostMapping(value = ZUUL_URL_PREFIX+"/member/cartDel")
    JSONResponse deleteCartItem(@RequestBody VOCart cart);

    @PostMapping(value = ZUUL_URL_PREFIX+"/member/delCartChecked")
    JSONResponse delChecked(@RequestBody VOCart cart);
}
